home *** CD-ROM | disk | FTP | other *** search
- {$A+,B-,D+,E+,F-,G+,I+,L+,N-,O-,P-,Q-,R-,S+,T-,V+,X+}
- {$M 16384,0,655360}
-
- {
- GLENZ.PAS
- Demonstrates - animation window
- - clipping depth
- }
-
- uses crt,uve32;
-
- const maxspheres=100;
-
-
-
- procedure init;
- var pal:palette;
- i:integer;
- begin
- ia_inituve;
- ia_loadspr('sphere.uvl',1);
- ia_loadpalette('sphere.pal',pal);
- ia_chainsprite(1,spritesloaded,1);
- ia_loadfont(8);
- ia_setfontattr(8,plain,proportional,horizontal,255,true,0);
- ia_powerup;
- ia_setpalette(pal);
- ia_setcycletime(40);
- ia_setclipdepth(20);
- for i:=1 to maxspheres do with spr[i] do begin
- x:=random(310);
- y:=random(190);
- n:=1+random(30);
- end;
- end;
-
- procedure deinit;
- begin
- ia_shutdown;
- halt;
- end;
-
- var ch:char;
- size:integer;
- begin
- init;
- size:=0;
- repeat
- ia_doframepart1;
- ia_doframepart2;
- ia_box(hidden,size,size,319-size,199-size,83,false);
- ia_printstr(hidden,-32768,30,'Use + and - to resize window',89);
- ia_doframepart3;
- if keypressed then begin
- ch:=readkey;
- case ch of
- '+': size:=max(0,size-1);
- '-': size:=min(95,size+1);
- end;
- ia_setwindow(size,size,319-size,199-size);
- end;
- until ch=#27;
- deinit;
- end.